HEX
Server: Apache/2.4.68 (Debian)
System: Linux as-cs-widget-demo-us-central1 6.1.0-44-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.164-1 (2026-03-09) x86_64
User: root (0)
PHP: 8.2.32
Disabled: NONE
Upload Files
File: //lib/google-cloud-sdk/lib/surface/scc/assets/update_marks.yaml
- release_tracks: [ALPHA, BETA, GA]

  help_text:
    brief: Update Cloud Security Command Center asset's security marks.
    description: Update Cloud Security Command Center asset's security marks.
    examples: |
      Selectively update value of security mark (key1) with 'val1.1' on asset 5678 under organization 123456. Note that other security marks on the same asset will not change.

        $ {command} 5678 --organization=123456 --security-marks="key1=val1.1" --update-mask="marks.key1"

      Update value of security mark (key1) and delete other marks on asset 5678 under organization 123456:

        $ {command} 5678 --organization=123456 --security-marks="key1=updatedVal"

      Update value of security mark (key1) and delete other marks on asset 5678 under project example-project:

        $ {command} projects/example-project/assets/5678 --security-marks="key1=updatedVal"

      Update value of security mark (key1) and delete other marks on asset 5678 under folder 456:

        $ {command} folders/456/assets/5678 --security-marks="key1=updatedVal"

      Delete all security marks on asset 5678 under organization 123456:

        $ {command} 5678 --organization=123456 --security-marks=""

  request:
    collection: securitycenter.organizations.assets
    api_version: v1
    method: updateSecurityMarks
    modify_request_hooks:
    - googlecloudsdk.command_lib.scc.assets.request_hooks:UpdateAssetSecurityMarksReqHook

  arguments:
    additional_arguments_hook: googlecloudsdk.command_lib.scc.assets.resource_hooks:AppendAssetArg

    params:
    - arg_name: start-time
      type: googlecloudsdk.core.util.times:ParseDateTime
      processor: googlecloudsdk.core.util.times:FormatDateTime
      api_field: startTime
      help_text: |
        Time at which the updated SecurityMarks take effect. See `$ gcloud topic datetimes` for
        information on supported time formats.
    - arg_name: security-marks
      metavar: KEY=VALUE
      api_field: securityMarks
      help_text: |
        SecurityMarks resource to be passed as the request body. It's a key=value pair separated
        by comma (,). For example: --security-marks="key1=val1,key2=val2".
      type: "googlecloudsdk.calliope.arg_parsers:ArgDict:"
      processor: googlecloudsdk.command_lib.scc.hooks:SecurityMarksHook
    - arg_name: update-mask
      api_field: updateMask
      help_text: |
        Use update-mask if you want to selectively update marks represented by --security-marks
        flag. For example: --update-mask="marks.key1,marks.key2". If you want to override all the
        marks for the given asset either skip the update-mask flag or provide an empty value
        (--update-mask '') for it.